<!DOCTYPE>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>天天生鲜－商品列表</title>
    <link rel="stylesheet" th:href="@{/css/reset.css}" type="text/css">
    <link rel="stylesheet" th:href="@{/css/main.css}" type="text/css">
    <script th:src="@{js/jquery-1.12.4.min.js}" type="text/javascript"></script>
</head>
<body>
<!--头部  开始-->
<div th:include="~{global/header :: header}"></div>
<!--头部 结束-->

<div class="search_bar clearfix">
    <a class="logo fl" href="index.html"><img th:src="@{/images/logo.png}"></a>
    <div th:include="~{global/search :: search}"></div>
    <div th:include="~{global/carCount :: carCount}"></div>
</div>

<div class="navbar_con">
    <div class="navbar clearfix">
        <div class="subnav_con fl">
            <h1>全部商品分类</h1>
            <span></span>
            <ul class="subnav">
                <li><a class="fruit" href="#">新鲜水果</a></li>
                <li><a class="seafood" href="#">海鲜水产</a></li>
                <li><a class="meet" href="#">猪牛羊肉</a></li>
                <li><a class="egg" href="#">禽类蛋品</a></li>
                <li><a class="vegetables" href="#">新鲜蔬菜</a></li>
                <li><a class="ice" href="#">速冻食品</a></li>
            </ul>
        </div>
        <ul class="navlist fl">
            <li><a th:href="@{/index}">首页</a></li>
            <li class="interval">|</li>
            <li><a href="#">手机生鲜</a></li>
            <li class="interval">|</li>
            <li><a href="#">抽奖</a></li>
        </ul>
    </div>
</div>

<div class="breadcrumb">
    <a th:href="@{/index}">全部分类</a>
    <span>&gt;</span>
    <span>新鲜水果</span>
</div>

<div class="main_wrap clearfix">
    <div class="l_wrap fl clearfix">
        <div class="new_goods">
            <h3>新品推荐</h3>
            <ul>
                <li>
                    <a th:href="@{/shop_message}"><img th:src="@{/images/所有商品/57ab290aN34f76b37.jpg}"></a>
                    <h4><a th:href="@{/shop_message}"> 越南进口红心火龙果 3个装 大果 单果约450~500g </a></h4>
                    <div class="prize">￥33.90</div>
                </li>

                <li>
                    <a th:href="@{/shop_message}"><img th:src="@{/images/所有商品/5b4871e6N072f0d74.jpg}"></a>
                    <h4><a th:href="@{/shop_message}">寻天果蔬 泰国山竹水果 京东生鲜 5A级 热带水果 2.5k</a></h4>
                    <div class="prize">￥98.00</div>
                </li>


            </ul>
        </div>
    </div>

    <div class="r_wrap fr clearfix">
        <div class="sort_bar">

            <a class="active" href="#">默认</a>
            <a href="#">价格</a>
            <a href="#">人气</a>

        </div>

        <ul class="goods_type_list clearfix">
            <li>
                <a th:href="@{/shop_message}"><img th:src="@{/images/所有商品/57ab290aN34f76b37.jpg}"></a>
                <h4><a th:href="@{http://ttsx.newzn.cn/goods/detail/45}"> 越南进口红心火龙果 3个装 大果 单果约450~500g </a></h4>
                <div class="operate">
                    <span class="prize">￥33.90</span>
                    <span class="unit">33.90/1.94kg</span>
                    <a class="add_goods" href="javascript:;" title="加入购物车"></a>
                    <span id="spanid" style="display: none">45</span>
                </div>
            </li>

            <li>
                <a th:href="@{/shop_message}"><img th:src="@{/images/所有商品/5b4871e6N072f0d74.jpg}"></a>
                <h4><a th:href="@{/shop_message}">寻天果蔬 泰国山竹水果 京东生鲜 5A级 热带水果 2.5k</a></h4>
                <div class="operate">
                    <span class="prize">￥98.00</span>
                    <span class="unit">98.00/1.0kg</span>
                    <a class="add_goods" href="javascript:;" title="加入购物车"></a>
                    <span id="spanid" style="display: none">44</span>
                </div>
            </li>

            <li>
                <a th:href="@{/shop_message}"><img th:src="@{/images/所有商品/5b18c158N35a55d7a.jpg}"></a>
                <h4><a th:href="@{/shop_message}">中科农业 水果礼盒 水果提货券 礼券 238型 水果提货卡券</a></h4>
                <div class="operate">
                    <span class="prize">￥238.00</span>
                    <span class="unit">238.00/5.0kg</span>
                    <a class="add_goods" href="javascript:;" title="加入购物车"></a>
                    <span id="spanid" style="display: none">37</span>
                </div>
            </li>

            <li>
                <a th:href="@{/shop_message}"><img th:src="@{/images/所有商品/5b514c51N8170488f.jpg}"></a>
                <h4><a th:href="@{/shop_message}">维叶新鲜水果香蕉约17-23条天宝水果生鲜青蕉 香蕉17-2</a></h4>
                <div class="operate">
                    <span class="prize">￥29.90</span>
                    <span class="unit">29.90/750g</span>
                    <a class="add_goods" href="javascript:;" title="加入购物车"></a>
                    <span id="spanid" style="display: none">33</span>
                </div>
            </li>

            <li>
                <a th:href="@{/shop_message}"><img th:src="@{/images/所有商品/59251bebNea0fc46f.jpg}"></a>
                <h4><a th:href="@{http://ttsx.newzn.cn/goods/detail/3}">Zespri佳沛 新西兰绿奇异果 12个</a></h4>
                <div class="operate">
                    <span class="prize">￥39.70</span>
                    <span class="unit">39.70/500g</span>
                    <a class="add_goods" href="javascript:;" title="加入购物车"></a>
                    <span id="spanid" style="display: none">3</span>
                </div>
            </li>

            <li>
                <a th:href="@{/shop_message}"><img th:src="@{/images/所有商品/58ec98efN3db99134.jpg}"></a>
                <h4><a th:href="@{http://ttsx.newzn.cn/goods/detail/2}">华圣 高原红富士苹果 6个装 1.2kg</a></h4>
                <div class="operate">
                    <span class="prize">￥19.90</span>
                    <span class="unit">19.90/500g</span>
                    <a class="add_goods" href="javascript:;" title="加入购物车"></a>
                    <span id="spanid" style="display: none">2</span>
                </div>
            </li>

            <li>
                <a th:href="@{/shop_message}"><img th:src="@{/images/所有商品/58e62d46Ndcc0a865.jpg}"></a>
                <h4><a th:href="@{/shop_message}">千里山 海南金煌芒果 1.75kg装</a></h4>
                <div class="operate">
                    <span class="prize">￥38.90</span>
                    <span class="unit">38.90/500g</span>
                    <a class="add_goods" href="javascript:;" title="加入购物车"></a>
                    <span id="spanid" style="display: none">1</span>
                </div>
            </li>


        </ul>
        <div class="pagenation">
            <a class="active">1</a>
        </div>
    </div>
</div>

<!--底部 开始-->
<div th:include="~{global/header :: footer}"></div>
<!--底部 结束-->

<script>
    $(".add_goods").click(function () {

        $.get("/cart/updatecart/add/1/" + $(this).next().html() + "/1", function (data) {
            if (data.data != 0) {
                $("#show_count").html(data.data);
            }
        });

    });
</script>
</body>
</html>